class LogTrainee < ActiveRecord::Base

	has_one :trainee
	belongs_to :trainee
	
	has_one :cuenta
	belongs_to :cuenta
	
	# Busca todos los logs asociados a un trainee.
	def self.search(search, page, trainee_id)
		paginate :per_page => 7, :page => page,
		          :order => 'fecha_ingreso ASC', :conditions => ['trainee_id = '+trainee_id]
	end
	

end
